package actions;


import org.salespointframework.core.Action;
import org.salespointframework.core.SaleProcess;
import org.salespointframework.core.SalesPoint;



/**
 * The Class LogOutAction.
 */
public class LogOutAction implements Action {

	/* (non-Javadoc)
	 * @see org.salespointframework.core.Action#doAction(org.salespointframework.core.SaleProcess, org.salespointframework.core.SalesPoint)
	 */
	public void doAction(SaleProcess saleProcess, SalesPoint sp)
			throws Throwable {
		sp.detachUser();
		while((sp.getCurrentProcess() !=null))
			sp.getCurrentProcess().detachContext();


	}

}
